#include <iostream>
#include <vector>
using namespace std;

// 高精度加法：A + B
vector<int> add(const vector<int>& A, const vector<int>& B) {
    vector<int> C;
    int f = 0;
    for(int i = 0; i < A.size() || i < B.size(); i++) {
        int a = i < A.size() ? A[i] : 0;
        int b = i < B.size() ? B[i] : 0;
        int t = a + b + f;
        C.push_back(t % 10);
        f = t / 10;
    }
    if(f) {
        C.push_back(f);
    }
    return C;
}
// 打印高精度数字
void print(const vector<int>& num) {
    for (int i = num.size() - 1; i >= 0; --i)
        cout << num[i];
    cout << endl;
}

int main() {
    int n;
    cin >> n;

    if (n <= 2) {
        cout << n << endl;
        return 0;
    }

    vector<vector<int>> dp(n + 1);
    dp[0] = {0};
    dp[1] = {1};
    dp[2] = {2};

    for (int i = 3; i <= n; ++i)
        dp[i] = add(dp[i - 1], dp[i - 2]);

    print(dp[n]);
    return 0;
}